import request from '@/utils/request'

// 查询企业库列表
export function selectEnterpriseInfoDict() {
  return request({
    url: '/factor/enterpriseInfo/dict',
    method: 'get',
  })
}
export function listEnterpriseInfo(query) {
  return request({
    url: '/factor/enterpriseInfo/list',
    method: 'get',
    params: query
  })
}

// 查询企业库详细
export function getEnterpriseInfo(id) {
  return request({
    url: '/factor/enterpriseInfo/' + id,
    method: 'get'
  })
}

// 新增企业库
export function addEnterpriseInfo(data) {
  return request({
    url: '/factor/enterpriseInfo',
    method: 'post',
    data: data
  })
}

// 修改企业库
export function updateEnterpriseInfo(data) {
  return request({
    url: '/factor/enterpriseInfo',
    method: 'put',
    data: data
  })
}

// 删除企业库
export function delEnterpriseInfo(id) {
  return request({
    url: '/factor/enterpriseInfo/' + id,
    method: 'delete'
  })
}

// 清理参数缓存
export function clearEnterpriseInfoCache() {
  return request({
    url: '/factor/enterpriseInfo/clearCache',
    method: 'delete',
  })
}
